home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Arashi 1.1.1 / source code / For your think c folder / VA Kit ƒ / VA.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-18  |  2.4 KB  |  109 lines  |  [TEXT/KAHL]

  1. /*/
  2.      Project Arashi: VA.h
  3.      Major release: Version 1.1d2, 9/5/95
  4.  
  5.      Last modification: Sunday, July 18, 1993, 19:24
  6.      Created: Sunday, February 5, 1989, 17:24
  7.  
  8.      Copyright © 1989-1993, Juri Munkki
  9. /*/
  10.  
  11. #define    NUMDISPLISTS        (3)
  12.  
  13. #define    ANGLES                120
  14. #define    NUMCOLORS            10        /*    Currently 10 colors (3 background+7 animated)    */
  15.  
  16. #define    MAXSAVED            1000L
  17. #define MAXSAVEDPIX            1500L
  18. #define    DEFAULT_FRAMESPEED    3
  19. #define    QD32COMPATIBLE        0x0101
  20.  
  21. #define BGC                    255
  22. #define    BG2                    (255-64)
  23. #define    BG1                    (255-128)
  24.  
  25. #define    VAPosRandom()        ((unsigned int)VARandom())
  26. #define    FastPosRandom()        ((unsigned int)FastRandom())
  27.  
  28. typedef    struct
  29. {
  30.     WindowPtr        window;
  31.     int                monochrome;
  32.     Handle            palette;
  33.     Handle            device;
  34.     int                refnum;
  35.  
  36.     Ptr                base;
  37.     int                row;
  38.     Ptr                *quickrow;
  39.  
  40.     Rect            frame;
  41.     Rect            DisplayFrame;
  42.  
  43.     long            offset;
  44.     unsigned int    color;
  45.     unsigned int    field;
  46.     unsigned int    segmscale;
  47.     int                curbuffer;    /*    Buffer to draw into.            */
  48.     int                visbuffer;    /*    Visible frame buffer number.    */
  49.  
  50.     Rect            *lines[NUMDISPLISTS];
  51.     int                *linecolors[NUMDISPLISTS];
  52.     int                numlines[NUMDISPLISTS];
  53.     
  54.     long            *pix[NUMDISPLISTS];
  55.     int                *pixcolors[NUMDISPLISTS];
  56.     int                numpix[NUMDISPLISTS];
  57.     
  58.     long            *spots[NUMDISPLISTS];
  59.     int                *spotcolors[NUMDISPLISTS];
  60.     int                numspots[NUMDISPLISTS];
  61.  
  62.     unsigned long    ticker;
  63.     int                FrameSpeed;
  64.     int                FrameCounter;
  65.     int                SkipFrames;
  66.     int                Late;
  67.     int                SkipCounter;
  68.     int                CurrentX;
  69.     int                CurrentY;
  70.  
  71. }    VAGlobalsRecord;
  72.  
  73.  
  74. #define    VAMoveTo(x,y) {    VA.CurrentX=(x); VA.CurrentY=(y); }
  75. #define    VApalette    ((PaletteHandle)VA.palette)
  76. #ifdef VECTOR_ANIMATION_MAIN
  77.         VAGlobalsRecord        VA;
  78.         int                    Sins[ANGLES];
  79.         int                    Cosins[ANGLES];
  80.         long                VARandSeed;
  81. #else
  82. extern    VAGlobalsRecord        VA;
  83. extern    int                    Sins[];
  84. extern    int                    Cosins[];
  85. extern    long                VARandSeed;
  86. #endif
  87.  
  88. void VASetColors(Handle theColors);
  89. Handle VAGetColors();
  90. void VAEraseBuffer();
  91. void VALine(int x1, int y1, int x2, int y2);
  92. void VALineTo(int x, int y);
  93. void VASafeLineTo(int x, int y);
  94. void VAPixel(int,int);
  95. void VASafePixel(int x, int y);
  96. void VASpot(int,int);
  97. void VASafeSpot(int,int);
  98. void VADrawNumber(long num, int x, int y);
  99. void VADrawPadNumber(long num, int x, int y, int width);
  100. void VAExplosion(int x, int y, int size, int color);
  101. void VAStaticLine(int,int,int,int);
  102. void VAStaticLineTo(int,int);
  103. void VAStep(void);
  104. void VAClose(void);
  105. Handle    ScreenSelect();
  106. int     VAClip(Rect *ptrec);
  107. void VADrawText(char *,long,long);
  108. void *VAColorToQD(int);
  109.